package cn.sciento.boot.tenant.hiam.domain.entity;

import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;
import io.choerodon.mybatis.domain.AuditDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import cn.sciento.boot.platform.lov.annotation.LovValue;

@ApiModel("租户初始化日志")
@VersionAudit
@ModifyAudit
@Table(name = "hpfm_tenant_init_log")
public class TenantInitLog extends AuditDomain {
  public static final String FIELD_TENANT_INIT_LOG_ID = "tenantInitLogId";
  
  public static final String FIELD_TENANT_NUM = "tenantNum";
  
  public static final String FIELD_SERVICE_NAME = "serviceName";
  
  public static final String FIELD_PROCESSOR_CODE = "processorCode";
  
  public static final String FIELD_PROCESSOR_NAME = "processorName";
  
  public static final String FIELD_PROCESSOR_TYPE = "processorType";
  
  public static final String FIELD_INIT_TYPE = "initType";
  
  public static final String FIELD_ORDER_SEQ = "orderSeq";
  
  public static final String FIELD_PROCESS_STATUS = "processStatus";
  
  public static final String FIELD_PROCESS_TIME = "processTime";
  
  public static final String FIELD_PROCESS_MESSAGE = "processMessage";
  
  public static final String FIELD_REMARK = "remark";
  
  @ApiModelProperty("表ID，主键，供其他表做外键")
  @Id
  @GeneratedValue
  private Long tenantInitLogId;
  
  @ApiModelProperty("租户编码,hpfm_tenant.tenant_num")
  @NotBlank
  private String tenantNum;
  
  @ApiModelProperty("服务名称")
  @NotBlank
  private String serviceName;
  
  @ApiModelProperty("处理器代码")
  @NotBlank
  private String processorCode;
  
  @ApiModelProperty("处理器名称，表述处理器所做内容")
  @NotBlank
  private String processorName;
  
  @ApiModelProperty("处理器类型，代码HPFM.TENANT_PROCESSOR_TYPE，PRE_PROCESSOR-前置处理器，POST_PROCESSOR-后置处理器")
  @NotBlank
  @LovValue(lovCode = "HPFM.TENANT_PROCESSOR_TYPE", meaningField = "processorTypeMeaning")
  private String processorType;
  
  @ApiModelProperty("初始化类型，代码HPFM.TENANT_INIT_TYPE，CREATE-创建，UPDATE-更新")
  @NotBlank
  @LovValue(lovCode = "HPFM.TENANT_INIT_TYPE", meaningField = "initTypeMeaning")
  private String initType;
  
  @ApiModelProperty("排序号")
  @NotNull
  private Long orderSeq;
  
  @ApiModelProperty("初始化状态，代码HPFM.TENANT_INIT_STATUS;S-成功；E-失败")
  @NotBlank
  @LovValue(lovCode = "HPFM.TENANT_INIT_STATUS", meaningField = "processStatusMeaning")
  private String processStatus;
  
  @ApiModelProperty("初始化时间")
  @NotNull
  private Date processTime;
  
  @ApiModelProperty("初始化消息")
  private String processMessage;
  
  @ApiModelProperty("备注说明")
  private String remark;
  
  @ApiModelProperty("实例号，UUID")
  private String instanceKey;
  
  @Transient
  private String processorTypeMeaning;
  
  @Transient
  private String initTypeMeaning;
  
  @Transient
  private String processStatusMeaning;
  
  public Long getTenantInitLogId() {
    return this.tenantInitLogId;
  }
  
  public void setTenantInitLogId(Long tenantInitLogId) {
    this.tenantInitLogId = tenantInitLogId;
  }
  
  public String getTenantNum() {
    return this.tenantNum;
  }
  
  public void setTenantNum(String tenantNum) {
    this.tenantNum = tenantNum;
  }
  
  public String getServiceName() {
    return this.serviceName;
  }
  
  public void setServiceName(String serviceName) {
    this.serviceName = serviceName;
  }
  
  public String getProcessorCode() {
    return this.processorCode;
  }
  
  public void setProcessorCode(String processorCode) {
    this.processorCode = processorCode;
  }
  
  public String getProcessorName() {
    return this.processorName;
  }
  
  public void setProcessorName(String processorName) {
    this.processorName = processorName;
  }
  
  public String getProcessorType() {
    return this.processorType;
  }
  
  public void setProcessorType(String processorType) {
    this.processorType = processorType;
  }
  
  public String getInitType() {
    return this.initType;
  }
  
  public void setInitType(String initType) {
    this.initType = initType;
  }
  
  public Long getOrderSeq() {
    return this.orderSeq;
  }
  
  public void setOrderSeq(Long orderSeq) {
    this.orderSeq = orderSeq;
  }
  
  public String getProcessStatus() {
    return this.processStatus;
  }
  
  public void setProcessStatus(String processStatus) {
    this.processStatus = processStatus;
  }
  
  public Date getProcessTime() {
    return this.processTime;
  }
  
  public void setProcessTime(Date processTime) {
    this.processTime = processTime;
  }
  
  public String getProcessMessage() {
    return this.processMessage;
  }
  
  public void setProcessMessage(String processMessage) {
    this.processMessage = processMessage;
  }
  
  public String getRemark() {
    return this.remark;
  }
  
  public void setRemark(String remark) {
    this.remark = remark;
  }
  
  public String getProcessorTypeMeaning() {
    return this.processorTypeMeaning;
  }
  
  public void setProcessorTypeMeaning(String processorTypeMeaning) {
    this.processorTypeMeaning = processorTypeMeaning;
  }
  
  public String getInitTypeMeaning() {
    return this.initTypeMeaning;
  }
  
  public void setInitTypeMeaning(String initTypeMeaning) {
    this.initTypeMeaning = initTypeMeaning;
  }
  
  public String getProcessStatusMeaning() {
    return this.processStatusMeaning;
  }
  
  public void setProcessStatusMeaning(String processStatusMeaning) {
    this.processStatusMeaning = processStatusMeaning;
  }
  
  public String getInstanceKey() {
    return this.instanceKey;
  }
  
  public void setInstanceKey(String instanceKey) {
    this.instanceKey = instanceKey;
  }
}
